import {NgModule} from '@angular/core';
import {HomeComponent} from './home.component';
import {RouterModule} from '@angular/router';
import {FormsModule} from '@angular/forms';
import {CommonModule} from '@angular/common';
import {PluginModule} from 'itcloud-plugin';
import {DemoCommonModule} from '../common/demo-common.module';

@NgModule({
    imports: [
        FormsModule,
        CommonModule,
        DemoCommonModule,
        PluginModule,
        RouterModule.forChild([
            {
                path: '',
                component: HomeComponent,
                children: [
                    {
                        path: 'demo',
                        loadChildren: './demo/demo.module#DemoModule'
                    },
                    {
                        path: '**',
                        redirectTo: 'demo'
                    }
                ]
            },
            {
                path: '**',
                redirectTo: ''
            },
        ])
    ],
    providers: [
    ],
    declarations: [
        HomeComponent,
    ],
    exports: [
        HomeComponent,
    ],
    entryComponents: [
    ]
})
export class HomeModule {
}
